package com.example.myapplication.DesignPatterns.strategy;

import com.example.myapplication.thirdcamera.util.Log;

import java.math.BigDecimal;

/**
 * VIP会员顾客优惠策略
 */
public class DiamondCustomer implements PreferentialStrategy {
    @Override
    public BigDecimal getPrice(BigDecimal originalPrice) {
        Log.i("dove","VIP会员客户享有9折优惠");
        originalPrice = originalPrice.multiply(new BigDecimal(0.5)).setScale(2,BigDecimal.ROUND_HALF_UP);
        return originalPrice;
    }
}
